//
//  ViewController.swift
//  NavigationAnimation
//
//  Created by hongyan.yang on 2021/9/14.
//

import UIKit

class FirstViewController: UIViewController {

    @IBOutlet weak var imageView: UIImageView!
    var animator = TransformAnimator()

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
    }

    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(true)
        navigationController?.delegate = animator
    }
    override func viewDidDisappear(_ animated: Bool) {
        super.viewDidDisappear(animated)
        navigationController?.delegate = nil
    }
}
extension FirstViewController: TransformAnimationViewController {
    var animatingView: UIView {
        return imageView
    }
}
